<?php
require_once('lib/member.php');
require_once('lib/utils.php');

// admin/modo
$is_admin = $_SESSION['status_code'] == 'ADMIN';


$members = member_get_by_status('CANCELED');
$count = mysql_num_rows($members);
?>
<script src="pages_admin/adherents/adherents.js" type="text/javascript"></script>
<h3>Inscriptions annulées</h3>
<?php
echo icon_tag('cancel').' &nbsp; <strong id="nbmember">'.$count.'</strong> '.plural('inscription', $count).' '.plural('annulée', $count);

if ($row = mysql_fetch_assoc($members)) {
	?>
	<table class="dataTable">
		<thead>
			<tr>
				<th>Nom</th>
				<th>Prénom</th>
				<th>Date de naissance</th>
				<th>Action</th>
			</tr>
		</thead>
		<tbody>
		<?php
		do {
			echo '
			<tr id="ligne'.$row['id'].'">
				<td>'.$row['name'].'</td>
				<td>'.$row['firstname'].'</td>
				<td>'.$row['birth'].'</td>
				<td class="action">
					<a href="javascript:details('.$row['id'].');" title="Voir les détails">
						'.icon_tag('magnifier').'
					</a>

					<a href="index.php?p=inscription&id='.$row['id'].'" title="Modifier les informations">
						'.icon_tag('pencil').'
					</a>
					
					<span>
						<a href="javascript:void(0);" class="js-ask-validation" title="Supprimer ce membre">
							'.icon_tag('delete').'
						</a>
						<span class="hidden confirm-box">
							Supprimer définitivement ?<br />
							<a href="javascript:void(0);" class="js-delete-member b-oui" id="deletemember_'.$row['id'].'"></a>
							<a href="javascript:void(0);" class="js-hide b-non"></a>
						</span>
					</span>
				</td>
			</tr>';
		} while ($row = mysql_fetch_assoc($members));
		?>
		</tbody>
	</table>
	<?php
}
?>
